home *** CD-ROM | disk | FTP | other *** search
/ Technotools / Technotools (Chestnut CD-ROM)(1993).ISO / lang_c / ucturbo2 / uc.h < prev    next >
Text File  |  1987-05-23  |  2KB  |  69 lines

  1. /***************************************************************************
  2.  *                                                                         *
  3.  *                             uc.h                                        *
  4.  *                                                                         *
  5.  *      The unicorn library header for version 4.0                         *
  6.  *                                                                         *
  7.  ***************************************************************************/
  8.  
  9.  /*  alias data types  */
  10.  
  11. #define META    short
  12. #define UCHAR   unsigned char
  13. #define UINT    unsigned int
  14. #define ULONG   unsigned long
  15. #define USHORT  unsigned short
  16.  
  17. /*  Boolean data type  */
  18.  
  19. typedef enum
  20. {
  21.    FALSE, TRUE
  22. } BOOLEAN;
  23.  
  24. /* Return values and exit codes */
  25.  
  26. #define OK       0
  27. #define BAD      1
  28. #define SUCCESS  0
  29. #define FAILURE  1
  30.  
  31. /*  infinite loop declaration */
  32.  
  33. #define FOREVER   1
  34.  
  35. /* masks */
  36.  
  37. #define HIBYTE    0xff00
  38. #define LOBYTE    0x00ff
  39. #define HI_NIBBLE 0x0f
  40. #define LO_NIBBLE 0xf0
  41. #define ASCII     0x7f
  42. #define HIBIT     0x80
  43.  
  44. /* data lengths */
  45.  
  46. #define MAXNAME  8
  47. #define MAXEXT   3
  48. #define MAXLINE  256
  49. #define MAXPATH  64
  50.  
  51. /* special values */
  52.  
  53. #define BIGGEST  65535
  54.  
  55.  
  56. /*  macro Unit conversions */
  57.  
  58. #define INCH_CM(x)        ((x)*2.54)
  59. #define CM_INCH(x)        ((x)*0.3937008)
  60. #define DEG_RAD(x)        ((x)*0.017453293)
  61. #define RAD_DEG(x)        ((x)*57.29577951)
  62. #define OZ_GM(x)          ((x)*28.349523)
  63. #define GM_OZ(x)          ((x)*0.035274)
  64. #define GAL_LT(x)         ((x)*3.78541)
  65. #define LT_GAL(x)         ((x)*0.2642722)
  66. #define LB_KG(x)          ((x)*0.45359237)
  67. #define KG_LB(x)          ((x)*2.20462262)
  68.  
  69.